//
//  UIColor+KS.m
//  INMOTION
//
//  Created by KK on 2017/11/30.
//  Copyright © 2017年 Inmotion. All rights reserved.
//

#import "UIColor+KS.h"

@implementation UIColor (KS)

+ (UIColor *)colorFromString:(NSString *)string {
    NSArray *values = [string componentsSeparatedByString:@","];
    if (values.count >= 3) {
        int r = [values[0] intValue];
        int g = [values[1] intValue];
        int b = [values[2] intValue];
        return IMTColor(r, g, b);
    }
    return kIMTDefaultPostUserNameColor;
}

@end
